<?php
	$dbh = mysql_connect('192.168.1.116', 'rosrobot', 'honglajiao');
	mysql_query("set names 'utf8'");
	mysql_select_db('rosrobot');
	$sql = "SELECT * from robot_place"; 
	$list = mysql_query($sql,$dbh);
	$a = array();
	while ($point = mysql_fetch_array($list)){
		$id = $point["id"];
		$name = $point["name"];
		$x = $point["x"];
		$y = $point["y"];
		$arr=array('id'=>$id,'name'=>$name,'x'=>$x,'y'=>$y);  
		array_push($a,$arr);		
	}		
	$result=json_encode($a);
	$callback=$_GET['callback'];  
	echo $callback."($result)";  
	mysql_close();
?>